Optimal. Leaf size=17 \[ \frac{1}{2} \log \left (\cos ^2(x)+1\right )-\log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0290009, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {3194, 36, 29, 31} \[ \frac{1}{2} \log \left (\cos ^2(x)+1\right )-\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3194
Rule 36
Rule 29
Rule 31
Rubi steps
\begin{align*} \int \frac{\tan (x)}{1+\cos ^2(x)} \, dx &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x (1+x)} \, dx,x,\cos ^2(x)\right )\right )\\ &=-\left (\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,\cos ^2(x)\right )\right )+\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{1+x} \, dx,x,\cos ^2(x)\right )\\ &=-\log (\cos (x))+\frac{1}{2} \log \left (1+\cos ^2(x)\right )\\ \end{align*}
Mathematica [A] time = 0.0077098, size = 17, normalized size = 1. \[ \frac{1}{2} \log \left (\cos ^2(x)+1\right )-\log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 16, normalized size = 0.9 \begin{align*} -\ln \left ( \cos \left ( x \right ) \right ) +{\frac{\ln \left ( 1+ \left ( \cos \left ( x \right ) \right ) ^{2} \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.93429, size = 26, normalized size = 1.53 \begin{align*} -\frac{1}{2} \, \log \left (\sin \left (x\right )^{2} - 1\right ) + \frac{1}{2} \, \log \left (\sin \left (x\right )^{2} - 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.24942, size = 59, normalized size = 3.47 \begin{align*} \frac{1}{2} \, \log \left (\frac{1}{2} \, \cos \left (x\right )^{2} + \frac{1}{2}\right ) - \log \left (-\cos \left (x\right )\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )}}{\cos ^{2}{\left (x \right )} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18429, size = 23, normalized size = 1.35 \begin{align*} \frac{1}{2} \, \log \left (\cos \left (x\right )^{2} + 1\right ) - \frac{1}{2} \, \log \left (\cos \left (x\right )^{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]